<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>Document</title>
    </head>
    <body>
        <script type="text/javascript" >
            let obj1 = {a:1}
            let obj2 = {b:2}

           Object.defineProperty(obj1,'b',{
               get(){
                   return obj2.b
               },
               set(val){
                   obj2.b = val
               }
           })
    </script>
    </body>
</html>